use crate::util::http::HttpResponse;
use bytes::Bytes;
use serde::Serialize;
use std::collections::HashMap;

pub mod balance_sheet;
pub(crate) mod quote;
pub(crate) mod service;
#[derive(new, Debug, Serialize)]
pub struct FinanceReport {
    values: Vec<FinanceReportItem>,
}
impl FinanceReport {
    pub fn push_value(&mut self, value: FinanceReportItem) {
        self.values.push(value);
    }
    pub fn inner(self) -> Vec<FinanceReportItem> {
        self.values
    }
}

#[derive(new, Debug, Serialize)]
pub struct FinanceReportItem {
    name: String,
    values: Vec<FinanceReportValue>,
}

impl FinanceReportItem {
    pub fn push_value(&mut self, value: FinanceReportValue) {
        self.values.push(value);
    }
}

#[derive(new, Debug, Serialize)]
pub struct FinanceReportValue {
    date: String,
    value: Option<f64>,
}
